package com.qf.ability.search.application;

import com.qf.ability.search.service.ICourseIndexSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 微服务启动时触发！
 * author Ken
 * create_time 2022/9/26
 */
@Component
public class ApplicationRunning implements CommandLineRunner {

    @Autowired
    private ICourseIndexSearchService courseIndexSearchService;

    @Override
    public void run(String... args) throws Exception {
        courseIndexSearchService.createIndex();
    }
}
